﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using _1Dot9MasterBiz;
using System.Collections;
using System.Data.SqlClient;
using System.Configuration;
using _1Dot9MasterCommon;

public partial class Admin_BoardList : AdminBasePage
{
    private DataSet ds;

    protected void Page_Load(object sender, EventArgs e)
    {
        init();

        if (!IsPostBack)
        { BindData(); }
    }

    private void BindData()
    {
      //  String ConnectionStringSettings = ToString
       // SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["conStr"].ToString());
      //  SqlCommand cmd = new SqlCommand("UP_SELECT_BOARD", con);
       // SqlDataAdapter adapter = new SqlDataAdapter(cmd);
       // DataSet ds = new DataSet();
       // adapter.Fill(ds, "TB_Board");
       // GridView1.DataSource = ds.Tables["TB_Board"];
       // GridView1.DataBind();
    }
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if ((ListItemType)e.Row.RowType == ListItemType.Item || (ListItemType)e.Row.RowType == ListItemType.AlternatingItem)
        {
            HyperLink hl = new HyperLink();
            hl.Text = e.Row.Cells[2].Text;
            hl.NavigateUrl = "Content.aspx?seq=" + e.Row.Cells[0].Text;
            e.Row.Cells[2].Controls.Clear();
            e.Row.Cells[2].Controls.Add(hl);
            DateTime newDate = (DateTime)((DataRowView)e.Row.DataItem)["wdate"];
            TimeSpan gap = DateTime.Now - newDate;
            if (gap.TotalHours < 24)
            {
                Literal l = new Literal();
                l.Text = " [new]";
                e.Row.Cells[2].Controls.Add(l);
            }
        }
    }

    private void BoardList(DataSet ds)
    {
 
        
        
    }

    protected void btnWrite_Click(object sender, ImageClickEventArgs e)
    {

    }
    protected void btnDelete_Click(object sender, ImageClickEventArgs e)
    {

    }
}